libxl: validate scheduler parameters
authorIan Campbell <ian.campbell@citrix.com>
Fri, 22 Jun 2012 10:41:43 +0000 (11:41 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Jun 2012 10:41:43 +0000 (11:41 +0100)
commit7f15d8540d2ea880170194700a8fb4600da8643b
treed89ea7967dc457a45cb411a3908e887af8d4172b
parent31960ef4537fd485f2b2f80077b7c07f7d0ab56e
libxl: validate scheduler parameters

This was previously done by xl itself however the domain was not
created at that point so there was no domid to check. This happened to
work on first boot because xl's global domid was initialised to zero
so we would (incorrectly) validate the new domain to be against
domain0. On reboot though we would try to use the old domain's id and
fail.

sched_params_valid is moved and gains a gc+domid parameters and
s/ctx/CTX/. The call is placed after
libxl__domain_build_info_setdefault in the create path, because
set_defaults doesn't have access to the domid and there are other
callers which don't even have a domid to give it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_create.c
tools/libxl/xl_cmdimpl.c